package cn.yunhe.crm.dao;

import cn.yunhe.crm.entity.Organization;
import cn.yunhe.crm.entity.OrganizationExample;


import java.util.List;

import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface OrganizationMapper {
    int countByExample(OrganizationExample example);

    int deleteByExample(OrganizationExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Organization record);

    int insertSelective(Organization record);

    List<Organization> selectByExample(OrganizationExample example);

    Organization selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Organization record, @Param("example") OrganizationExample example);

    int updateByExample(@Param("record") Organization record, @Param("example") OrganizationExample example);

    int updateByPrimaryKeySelective(Organization record);

    int updateByPrimaryKey(Organization record);


    /**
     * ������Ϣ�б�
     * @return
     */

    List<Organization> findAllOrganization();

	Organization findOrganizationById(Integer oid);

	

	/**
	 * ͨ����Ÿ��Ļ���״̬����ɾ������
	 * @param id
	 * @return
	 */
	int editOrganStateById(Integer id);
	
	/**
	 * ͨ��������ѯ����
	 * @param organame
	 * @return
	 */
	Organization researchOrganziation(String organame);
	
	/**
	 * ��ӻ���
	 * @param organization
	 * @return
	 */
	int insertOrganization(Organization organization);


	int checkCountByYearAndMonth(Map map);
	
	/**
	 * 日志管理部分
	 * @return
	 */
	List<Organization> findOrganizationForAjax();

	
	int  checkCountByToday();
	
	int updateOrganById(Organization organization);



}